import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import '@/styles.scss'
import '@/style/main.scss'
import * as filters from './filters'

import { Select } from "element-ui";

// 声明组件
import Head from "@/components/Head";
import Foot from "@/components/Foot";
import Aside from "@/components/Aside";

import "./assets/less/index.less"

//使用vue
Vue.use(ElementUI)

//组件
Vue.component('Head', Head)
Vue.component('Foot', Foot)
Vue.component('Aside', Aside)

Vue.use(Select);


// 页面跳转后滚动条位于最上方
router.afterEach((to, from, next) => {
  window.scrollTo(0, 0);
});

// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})


Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')